using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;

namespace Zsa.Emulation.PPU
{
    /// <summary>
    /// Nes sprite data structure.
    /// </summary>
    [StructLayout(LayoutKind.Sequential,Pack=1,Size=4)]
    public struct NesSprite
    {
        /// <summary>
        /// The y location.
        /// </summary>
        public readonly byte LocationY;

        /// <summary>
        /// The pattern index from the offset
        /// set in the control register one.
        /// </summary>
        private byte TilePatternIndex;

        /// <summary>
        /// The sprite flags.
        /// </summary>
        private SpriteFlags Flags;

        /// <summary>
        /// The x location.
        /// </summary>
        private byte LocationX;

        /// <summary>
        /// Gets the color atr.
        /// </summary>
        /// <value>The color atr.</value>
        public byte ColorAtr
        {
            get
            {
                return (byte)(Flags & SpriteFlags.ColorBits);
            }
        }
        //public NesSprite(byte[] spriteBytes)
        //{
        //}


        //public byte X
        //{
        //}

    }
}
